<script setup lang="ts">

const prop = defineProps<{ name: string, age: number, ikun: boolean }>()

defineEmits<{
    (e: 'changeAge', money: number): void
}>()
</script>

<template>
    <div class="son-content">
        <H2>子组件-Son</H2>
        <P>名字：{{ name }}</P>
        <P>年龄：{{ age }}</P>
        <P>IKUN：{{ ikun }}</P>
        <button @click="$emit('changeAge', age + 1)">长大一岁</button>
    </div>
</template>

<style>
/* 样式 */
.son-content {
    box-sizing: border-box;
    padding: 10px;
    width: 300px;
    height: 300px;
    background-color: aqua;
}
</style>